<?php

namespace App\Models;

use App\Common\Traits\HasAgentRevenues;

class AgentWithdrawRecord extends Base
{
    use HasAgentRevenues;

    /**
     * 审核状态: 待审核
     */
    const STATUS_PENDING_REVIEW = 1;

    /**
     * 审核状态: 已通过
     */
    const STATUS_PASSED = 2;

    /**
     * 审核状态: 未通过
     */
    const STATUS_DID_NOT_PASS = 3;

    const STATUS_MAP = [
        self::STATUS_PENDING_REVIEW => '待审核',
        self::STATUS_PASSED => '已同意',
        self::STATUS_DID_NOT_PASS => '已拒绝'
    ];

    public function agent()
    {
        return $this->belongsTo(Agent::class);
    }
}
